
import 'dart:ui';

import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/localizations.dart';
import 'package:reabammendian/src/reabam/operation/db/objectbox.dart';
import 'package:reabammendian/src/reabam/operation/rb_config.dart';
import 'package:reabammendian/src/reabam/operation/rb_enum.dart';
import 'package:xsdk_flutter/xsdk/xsdk_flutter_package.dart';
import 'reabam/ui/pagestate_welcome.dart';

class MyApp extends XSDKApp{

  MyApp({super.titleName});

  @override
  Widget initFirstPage() {
    return XPage(() => WelcomeStatePage(milliseconds: 2000));
  }

  @override
  void initData() async{
    //h5 url
    _setH5Url();
  }

  //设置h5 url
  void _setH5Url(){
    if(RBConfigs.versionType==VersionType.officialVersion){
      //正式版
      RBConfigs.h5Url= 'https://mct.reabam.com/index.html?=t';
    }else if(RBConfigs.versionType==VersionType.bluegreenVersion){
      //蓝绿版(未设置
      RBConfigs.h5Url= 'https://pos2.reabam.com/index.html?=t';
    }else if(RBConfigs.versionType==VersionType.testVersion){
      //测试版
      RBConfigs.h5Url= 'http://fat-mct.reabam.com:58090/index.html?=t';
    }else if(RBConfigs.versionType==VersionType.developerVersion){
      //开发板(未设置
      RBConfigs.h5Url= 'http://192.168.2.177:8055/index.html?=t';
    }
  }

  @override
  List<LocalizationsDelegate>? getLocalizationsDelegates() {
    return null;
  }

  @override
  List<Locale>? getSupportedLocales() {
    return null;
  }



}